﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PathologyDAL.Modle;
using PathologyDAL.Service;

namespace PathologyBLL.Service
{
    public class QueryServices
    {
        public async Task<List<FilterCondition>> LoadAllConditionAsync()
        {
            ConditionServices services = new ConditionServices();
            return await services.GetAllAsync();
        }

        public async Task<List<CalculateResult>> QueryAnsy(List<int>checkedConditions)
        {
            TumourServices tumourService = new TumourServices();

            var tumourCondition= await tumourService.QueryByFilterAnsy(checkedConditions);


            var queryGroup = tumourCondition.GroupBy(q => q.Tumour);
            foreach (var item in queryGroup)
            {
                if (item.Count() == checkedConditions.Count)
                {
                    //添加
                    int id = item.Key;

                    }

            }

          

           
        }
    }
}
